home *** CD-ROM | disk | FTP | other *** search
- on fb
- put the freeBlock / 1000 & " kb"
- end
-
- on translateColor nPCPaletteVal
- if not isMac() then
- return nPCPaletteVal
- end if
- if the colorDepth = 8 then
- return nPCPaletteVal
- end if
- case nPCPaletteVal of
- 0:
- set rgb to [255, 255, 255]
- 5:
- set rgb to [0, 255, 0]
- 6:
- set rgb to [255, 0, 0]
- 9:
- set rgb to [251, 255, 240]
- 13:
- set rgb to [0, 51, 153]
- 251:
- set rgb to [0, 0, 128]
- 255:
- set rgb to [0, 0, 0]
- otherwise:
- set rgb to [251, 255, 240]
- end case
- if the colorDepth = 16 then
- return rgb32(rgb)
- else
- if the colorDepth > 16 then
- return rgb256(rgb)
- end if
- end if
- end
-
- on rgb32 rgbList
- set r to getAt(rgbList, 1) / 8
- set g to getAt(rgbList, 2) / 8
- set b to getAt(rgbList, 3) / 8
- return (r * 1024) + (g * 32) + b
- end
-
- on rgb256 rgbList
- return (getAt(rgbList, 1) * 256 * 256) + (getAt(rgbList, 2) * 256) + getAt(rgbList, 3)
- end
-